package DiDi;

import org.apache.commons.lang3.text.StrBuilder;

/**
 * Description：
 * Author: zhangc
 * Date：2017/9/23 22:16
 */
public class TenToOX {

    public static void main(String[] args) {
        int a = 160;
        char[] ch = {'A', 'B', 'C', 'D', 'E', 'F'};
        StrBuilder sb = new StrBuilder();
        int i;
        while (a != 0) {
            i = a % 16;
            if (i > 9)
                sb.append(ch[ i - 10 ]);
            else
                sb.append(i);
            a = a / 16;
        }
        System.out.println(sb.reverse().toString());
    }


}
